home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bison1_1.zip / bison-1.11 / Makefile < prev    next >
Makefile  |  1992-06-11  |  4KB  |  122 lines

  1. # Makefile for bison
  2. #   Copyright (C) 1984, 1989 Bob Corbett and Free Software Foundation, Inc.
  3. # This file is part of Bison, the GNU Compiler Compiler.
  4. # Bison is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8. # Bison is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with Bison; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. # For sysV, you must uncomment the following lines
  17. #CFLAGS = -g -DUSG
  18. #LIBS = -lPW
  19. #and comment out the assignment of CFLAGS below.
  20. #Also, if getopt.c gives any trouble, delete it from OBJECTS.
  21. #so the system's getopt will be used.
  22.  
  23.  
  24. DESTDIR= /homes/bliss
  25. # where the installed binary goes
  26. BINDIR = $(DESTDIR)/bin/mips
  27.  
  28. # where the parsers go
  29. PARSERDIR = $(DESTDIR)/include
  30.  
  31. # where manual pages go and what their extensions should be
  32. MANDIR = $(DESTDIR)/man
  33. MANEXT = l
  34.  
  35. # names of parser files
  36. PFILE = bison.simple
  37. PFILE1 = bison.hairy
  38.  
  39. #CC = gcc
  40. CC = cc
  41. # It is unwise ever to compile a program without symbols.
  42. #CFLAGS = -O -fstrength-reduce -fdelayed-branch -fcombine-regs -finline-functions
  43. CFLAGS = -g -DUSG -Dsparc
  44.  
  45. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  46.      -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  47.  
  48. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  49.       getargs.o gram.o lalr.o lex.o                    \
  50.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  51.       warshall.o version.o                        \
  52.       getopt.o
  53.  
  54. start: bison
  55.  
  56. clean:
  57.     rm -f *.o core bison
  58.  
  59. install: bison
  60.     install bison $(BINDIR)
  61.     -cd $(PARSERDIR); rm -f $(PFILE) $(PFILE1)
  62. # Copy bison.simple, inserting directory name into the #line commands.
  63.     awk -f mergedir.awk dir=$(PARSERDIR) $(PFILE) > $(PARSERDIR)/$(PFILE)
  64.     cp $(PFILE1) $(PARSERDIR)
  65.     install -c bison.1 $(MANDIR)/bison.$(MANEXT)
  66.     chmod a+r $(PARSERDIR)/$(PFILE) $(PARSERDIR)/$(PFILE1) 
  67.     chmod a+r $(MANDIR)/bison.$(MANEXT)
  68.  
  69. bison: $(OBJECTS)
  70.     $(CC) $(LDFLAGS) -o bison $(OBJECTS) $(LIBS)
  71.  
  72. dist:    bison.tar bison.tar.Z
  73.  
  74. .PHONY: bison.tar
  75. bison.tar:
  76.     -rm -rf temp
  77.     mkdir temp
  78.     mkdir temp/bison
  79.     ln  COPYING ChangeLog Makefile REFERENCES bison.1 \
  80.         bison.simple bison.hairy mergedir.awk \
  81.         LR0.c allocate.c closure.c conflicts.c derives.c \
  82.         files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  83.         output.c print.c reader.c reduce.c symtab.c version.c \
  84.         warshall.c files.h gram.h lex.h machine.h new.h state.h \
  85.         symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  86.         vmshlp.mar README bison.texinfo bison.info* \
  87.       temp/bison
  88.     cp ../lib/getopt.c temp/bison
  89.     cd temp; tar chf ../bison.tar bison
  90.     -rm -rf temp
  91.  
  92. bison.tar.Z: bison.tar
  93.     compress < bison.tar > bison.tar.Z
  94.  
  95. TAGS: *.c *.h
  96.     etags *.c *.h
  97.  
  98. # This file is different to pass the parser file names
  99. # to the compiler.
  100. files.o: files.c files.h new.h gram.h
  101.     $(CC) -c $(CFLAGS) $(PFILES) files.c
  102.  
  103. LR0.o: machine.h new.h gram.h state.h
  104. closure.o: machine.h new.h gram.h
  105. conflicts.o: machine.h new.h files.h gram.h state.h
  106. derives.o: new.h types.h gram.h
  107. getargs.o: files.h
  108. lalr.o: machine.h types.h state.h new.h gram.h
  109. lex.o: files.h symtab.h lex.h
  110. main.o: machine.h
  111. nullable.o: types.h gram.h new.h
  112. output.o: machine.h new.h files.h gram.h state.h
  113. print.o: machine.h new.h files.h gram.h state.h
  114. reader.o: files.h new.h symtab.h lex.h gram.h
  115. reduce.o: files.h new.h machine.h gram.h
  116. symtab.o: new.h symtab.h gram.h
  117. warshall.o: machine.h
  118.